home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xa.undo;
-
- import com.extensibility.app.UI;
- import com.extensibility.xa.NotationModel;
- import com.extensibility.xa.XADesktop;
- import com.extensibility.xml.BaseDeclaration;
- import com.extensibility.xml.NotationDeclaration;
-
- public class NotationNameUndoable extends DeclTableUndoable {
- NotationDeclaration notationDecl;
-
- public NotationNameUndoable(NotationModel var1, BaseDeclaration var2, Object var3) {
- super(XADesktop.getTableForModel(var1), var2, var3);
- this.notationDecl = (NotationDeclaration)var2;
- super.oldValue = ((NotationModel)super.tableModel).getValueAt(super.tableModel.getRowForDecl(this.notationDecl), 2);
- }
-
- public String getPresentationName() {
- return UI.getString("undo.notations.name");
- }
-
- public void undo() {
- super.undo();
- String var1 = super.oldValue == null ? "" : (String)super.oldValue;
- ((DeclTableUndoable)this).getSchemaDoc().setDeclarationName(this.notationDecl, var1);
- ((DeclTableUndoable)this).setCellFocus(super.tableModel.getRowForDecl(this.notationDecl), 2);
- }
-
- public void doCommand() {
- ((DeclTableUndoable)this).getSchemaDoc().setDeclarationName(this.notationDecl, (String)super.newValue);
- }
-
- public void redo() {
- super.redo();
- this.doCommand();
- ((DeclTableUndoable)this).setCellFocus(super.tableModel.getRowForDecl(this.notationDecl), 2);
- }
- }
-